package cn.edu.scau.cmi.yanweijie.factory;

public class SimpleFactory {
	public static Meat meatCreator(String meatName) {
		System.out.println("Using Simple Factory creating Meat!");
		Meat meat = null;
		if(meatName.equalsIgnoreCase("Beef")) {
			meat = new Beef();
		}
		else if(meatName.equalsIgnoreCase("Chicken")) {
			meat = new Chicken();
		}
		else if(meatName.equalsIgnoreCase("Pork")) {
			meat = new Pork();
		}else {
			System.out.println("Wrong input!no meat for you !");
		}
		return meat;
	}
}
